import { getAsyncPage } from '@/utils/asyncComponentLoader'

export default {
    path: 'gas-data',
    name: 'GasData',
    component: getAsyncPage(() => import('@/components/nav/RouteCards.vue')),
    meta: {
        title: '燃气数据',
    },
    children: [{
        path: 'GasDataCenter',
        name: 'GasDataCenter',
        component: getAsyncPage(() => import('@/components/nav/Routesegmented.vue')),
        redirect: { name: 'GasChartAnalysis' },
        meta: {
            title: '用气数据中心',
            icon: 'pie',
            menu: '供气'
        },
        children: [
            {
                path: 'chart-analysis',
                name: 'GasChartAnalysis',
                component: getAsyncPage(() => import('@/views/EnergyData/GasData/GasDataCenter/ChartAnalysis/index.vue')),
                meta: {
                    title: '总览',
                    permission: ['view_gas_chart']
                }
            }, {
                path: 'area-statistics',
                name: 'GasAreaChartAnalysis',
                component: getAsyncPage(() => import('@/views/EnergyData/GasData/GasDataCenter/AreaChartAnalysis/index.vue')),
                meta: {
                    title: '按区域统计',
                    permission: ['view_gas_chart']
                }
            }, {
                // 按用途统计
                path: 'subcategory',
                name: 'GasSubcategoryChartAnalysis',
                component: getAsyncPage(() => import('@/views/EnergyData/GasData/GasDataCenter/Subcategory/index.vue')),
                meta: {
                    title: '按用途统计',
                    permission: ['view_gas_chart']
                }
            }
        ]
    }, {
        path: 'intelligent-meter',
        name: 'GasIntelligentMeter',
        component: getAsyncPage(() => import('@/components/nav/Routesegmented.vue')),
        redirect: { name: 'GasDailyMeter' },
        meta: {
            title: '智能抄表',
            icon: 'intelligentMeter',
            menu: '供气'
        },
        children: [{
            path: 'daily-meter',
            name: 'GasDailyMeter',
            component: getAsyncPage(() => import('@/views/EnergyData/GasData/IntelligentMeter/DailyMeter/index.vue')),
            meta: {
                title: '日抄表记录',
                permission: ['view_gas_daily_statistics_report']
            }
        }, {
            path: 'monthly-meter',
            name: 'GasMonthlyMeter',
            component: getAsyncPage(() => import('@/views/EnergyData/GasData/IntelligentMeter/MonthlyMeter/index.vue')),
            meta: {
                title: '日统计报表',
                permission: ['view_gas_daily_statistics_report_detail']
            }
        }, {
            path: 'annual-meter',
            name: 'GasAnnualMeter',
            component: getAsyncPage(() => import('@/views/EnergyData/GasData/IntelligentMeter/AnnualMeter/index.vue')),
            meta: {
                title: '月统计报表',
                permission: ['view_gas_month_statistics_report']
            }
        }, {
            path: 'daily-report',
            name: 'GasDailyReport',
            component: getAsyncPage(() => import('@/views/EnergyData/GasData/IntelligentMeter/DailyReport/index.vue')),
            meta: {
                title: '按时段按日报表',
                permission: ['view_gas_daily_report']
            }
        }]
    }, {
        path: 'gas-cost',
        name: 'GasCost',
        redirect: { name: 'GasPriceView' },
        component: getAsyncPage(() => import('@/components/nav/Routesegmented.vue')),
        meta: {
            title: '用气费用管理',
            icon: 'cost',
            menu: '供气'
        },
        children: [{
            path: 'price-view',
            name: 'GasPriceView',
            component: getAsyncPage(() => import('@/views/EnergyData/GasData/GasCost/PriceView/index.vue')),
            meta: {
                title: '用气费用概览',
                permission: ['view_gas_cost'],
            }
        }, {
            path: 'price-setting',
            name: 'GasPriceSetting',
            component: getAsyncPage(() => import('@/views/EnergyData/GasData/GasCost/PriceSetting/index.vue')),
            meta: {
                title: '用气费用设置',
                permission: ['set_gas_price'],

            }
        }]
    }]
}